package com.cskaoyan.mapper;

import com.cskaoyan.bean.pojo.Region;
import com.cskaoyan.bean.pojo.RegionExample;
import com.cskaoyan.bean.vo.RegionVo;
import com.cskaoyan.bean.wxvo.AddressList;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface RegionMapper {

    List<RegionVo> selectAllRegion();

    long countByExample(RegionExample example);

    int deleteByExample(RegionExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Region record);

    int insertSelective(Region record);

    List<Region> selectByExample(RegionExample example);

    Region selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Region record, @Param("example") RegionExample example);

    int updateByExample(@Param("record") Region record, @Param("example") RegionExample example);

    int updateByPrimaryKeySelective(Region record);

    int updateByPrimaryKey(Region record);

    String queryAddressById(@Param("id") Integer id);


    int queryIsDefaultById(@Param("id") Integer id);

    List<Integer> queryIdByUserId(@Param("userId") Integer userId);

    String queryMobileById(@Param("id") Integer id);

    String queryNameById(@Param("id") Integer id);

    int queryAreaIdById(@Param("id") Integer id);

    String queryAreaNameByAreaId(@Param("AreaId") Integer AreaId);

    int queryCityIdById(@Param("id") Integer id);

    String queryCityNameByCityId(@Param("cityId") int cityId);

    int queryProvinceIdById(@Param("id") Integer id);

    String queryProvinceNameByProvinceId(@Param("provinceId") int provinceId);

    String selectAddressById2(@Param("id") Integer id);

    Integer selectIdByUserId(@Param("userId") Integer userId);

    int setDeleteStatus(@Param("id") Integer id);

    //List<AddressList> queryAddressBeanByUserId(@Param("userId") Integer userId);
}